<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>模块管理</title>
    <link href="css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript">
    </script>
</head>
<body>
<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">首页</a></li>
        <li><a href="#">系统设置</a></li>
        <li><a href="#">模块管理</a></li>
    </ul>
</div>
<div class="rightinfo">
    <div class="tools">
        <ul class="toolbar">
            <li class="click"><span><img src="images/t01.png"/></span>添加</li>
            <li class="click"><span><img src="images/t02.png"/></span>修改</li>
            <li><span><img src="images/t03.png"/></span>删除</li>
            <li><span><img src="images/t04.png"/></span>统计</li>
        </ul>
        <ul class="toolbar1">
            <li><span><img src="images/t05.png"/></span>设置</li>
        </ul>
    </div>
    <table class="tablelist">
        <thead>
        <tr>
            <th>模块名称</th>
            <th>模块地址</th>
            <th>模块状态</th>
            <th>是否为父模块</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${modulesList}" var="temp1">
            <c:if test="${temp1.isparent == 0}">
                <tr>
                    <td>${temp1.name}</td>
                    <td>${temp1.url}</td>
                    <c:if test="${temp1.status == 0}">
                        <td>已启用&nbsp;&nbsp;<a href="#" class="tablelink">禁用</a></td>
                    </c:if>
                    <c:if test="${temp1.status == 1}">
                        <td>已禁用&nbsp;&nbsp;<a href="#" class="tablelink">启用</a></td>
                    </c:if>
                    <td>是</td>
                    <td><a href="#" class="tablelink">修改</a></td>
                </tr>
            </c:if>
            <c:forEach items="${modulesList}" var="temp2">
                <c:if test="${temp2.isparent == 1 and temp1.id == temp2.parentid}">
                    <tr>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;${temp2.name}</td>
                        <td>${temp2.url}</td>
                        <c:if test="${temp2.status == 0}">
                            <td>已启用&nbsp;&nbsp;<a href="#" class="tablelink">禁用</a></td>
                        </c:if>
                        <c:if test="${temp2.status == 1}">
                            <td>已禁用&nbsp;&nbsp;<a href="#" class="tablelink">启用</a></td>
                        </c:if>
                        <td>不是</td>
                        <td><a href="#" class="tablelink">修改</a></td>
                    </tr>
                </c:if>
            </c:forEach>
        </c:forEach>

        </tbody>
    </table>
    <div class="pagin">
        <div class="message">共<i class="blue">1256</i>条记录，当前显示第&nbsp;<i class="blue">2&nbsp;</i>页</div>
        <ul class="paginList">
            <li class="paginItem"><a href="javascript:;"><span class="pagepre"></span></a></li>
            <li class="paginItem"><a href="javascript:;">1</a></li>
            <li class="paginItem current"><a href="javascript:;">2</a></li>
            <li class="paginItem"><a href="javascript:;">3</a></li>
            <li class="paginItem"><a href="javascript:;">4</a></li>
            <li class="paginItem"><a href="javascript:;">5</a></li>
            <li class="paginItem more"><a href="javascript:;">...</a></li>
            <li class="paginItem"><a href="javascript:;">10</a></li>
            <li class="paginItem"><a href="javascript:;"><span class="pagenxt"></span></a></li>
        </ul>
    </div>
</div>
<script type="text/javascript">
    $('.tablelist tbody tr:odd').addClass('odd');
</script>
</body>
</html>
